package com.nhim.cms.admin.client.ctype.ui;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.google.gwt.activity.shared.Activity;
import com.google.gwt.cell.client.AbstractEditableCell;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.cell.client.ClickableTextCell;
import com.google.gwt.cell.client.FieldUpdater;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.requestfactory.shared.Receiver;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.cellview.client.CellTable;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.view.client.ListDataProvider;
import com.google.gwt.view.client.ProvidesKey;
import com.nhim.cms.admin.client.SpacerColumn;
import com.nhim.cms.admin.client.place.ContentTypePlace;
import com.nhim.cms.admin.client.style.Styles;
import com.nhim.cms.admin.shared.MessageManager;
import com.nhim.cms.admin.shared.NhimCMSAdminRequestFactory;

public class ContentType extends Composite implements Activity {
	
	private static ContentTypeUiBinder uiBinder = GWT
			.create(ContentTypeUiBinder.class);

	interface ContentTypeUiBinder extends
			UiBinder<Widget, ContentType> {
	}
	private Listener listener;
	/**
	 * Custom listener for this widget.
	 */
	public interface Listener {

		/**
		 * Called when the user delete ContentType.
		 * 
		 */
		void onDeleted();
	}
	public void setListener(Listener listener) {
		this.listener = listener;
	}

	final NhimCMSAdminRequestFactory requestFactory;
	MessageManager message = new MessageManager();
	Boolean isNew = true;

	public ContentType(final NhimCMSAdminRequestFactory requestFactory) {
		this.requestFactory = requestFactory;
		initWidget(uiBinder.createAndBindUi(this));
		
	}

	public String mayStop() {
		return null;
	}

	public void onCancel() {

	}

	public void onStop() {

	}

	public void start(AcceptsOneWidget panel, EventBus eventBus) {
		panel.setWidget(this);

	}

	private void save() {
	}
	/**
	 * In this application, called by {@link ExpensesActivityMapper} each time a
	 * ReportListPlace is posted. In a more typical set up, this would be a
	 * constructor argument to a one shot activity, perhaps managing a shared
	 * widget view instance.
	 */
	public void updateForPlace(final ContentTypePlace place) {
		
	}
}
